<?php 
	$front = Zend_Controller_Front::getInstance();
	
	//get module name
	$module =  $front->getRequest()->getModuleName();
	
	//get controller name
	$controller = $front->getRequest()->getControllerName();
	
	//get action	
	$action = $front->getRequest()->getActionName(); 
?>
<form id="frmAdminForm" method="get">
	<div class="searchBox">
	
			<!-- title -->
			<div class="searchBoxLeft">
				<label class="title">Tìm kiếm</label>
			</div>
			
			<!-- search field-->
			<div class="searchBoxRight">
				<div class="blockField">
					<label for="keyword">Từ khóa</label>  				
					<input type="text"	name="keyword" value="<?php echo $this->keyword?>" id="keyword">								 
				</div>	
			
				<div class="blockField">
					<button name="search" class='button'> Tìm kiếm </button>
					<input type='reset' value="Xóa"
						name="reset" class="reset button" />
				</div>
				<div class="clearb"></div>
			</div>
			
			<!-- filter -->
		
		<div class="clearb"></div>
	</div>

	<!-- list table -->
	<div class="listElement">
		
			<table>
				<thead>
					<tr>
						<th>STT</th>
						<th>
							<input type="checkbox" id="checkall" value='checkall' /><label
								for="checkall"></label>
						</th>
						<th>
							<?php echo $this->partial('partial/sort.phtml','admin',array(
								'columnname'=>'group_user_name',
								'columntitle'=>'Tên nhóm')
							)?>
						</th>
						
						<th>
							<?php echo $this->partial('partial/sort.phtml','admin',array(
								'columnname'=>'user_creation_time',
								'columntitle'=>'Ngày tạo')
							)?>
						</th>
						<th>Thao tác</th>
					</tr>
				</thead>
				<tbody>
					<?php 
						//số thứ tự
						$stt = ($this->paginator->getCurrentPageNumber()-1)*$this->paginator->getItemCountPerPage();
						$stt+=1;
					?>
					<?php 
						foreach($this->paginator as $item):							
					?>					
					<tr>
						<td><?php echo $stt++?></td>
						<td>
							<input type="checkbox" value="<?php echo $item['group_user_id'] ?>" name="id[]" /></td>							
						<td>
							<?php echo $item['group_user_name']?>	
							<br />
							<?php echo "alias: ".$item['group_user_alias'] ?>
						</td>
						
						<td>
							<?php 
								$date = date_create($item['group_user_creation_time']);
								echo date_format($date, 'd/m/Y');
							?>
						</td>
						<td>
							<a
								href="<?php echo $this->baseUrl()."/admin/groupuser/update/id/{$item["group_user_id"]}"?>"
								title="cập nhật" class="edit  option"> 
								<span class="small-edit-icon">&nbsp;</span>
							</a> 
							<a
								href="<?php echo $this->baseUrl()."/admin/groupuser/delete/id/{$item["group_user_id"]}"?>"
								title="xóa" class="delete  option"> 
								<span class="small-delete-icon">&nbsp;</span>
							</a>
						</td>
						
					</tr>
					<?php endforeach;?>
				</tbody>
			</table>
		<input type="hidden" name='order' value="" id="order" />
		
		<div class="controller">										
			<?php echo $this->paginationControl($this->paginator,'Sliding','partial/pagination.phtml'); ?>				
		</div>
	</div>
</form>
<div class="clearb">&nbsp;</div>